import allure

from pages.base_page import BasePage

class PaymentPage(BasePage):
    @property
    @allure.step("同意投保")
    def agree_button(self):
        if "version=v8_2" in self.page.url:
            return self.page.locator('img.goBtn')
        else:
            return self.page.locator('div.goPay.monthpay')

    @property
    @allure.step("同意升级")
    def agree_upgrade(self):
            return self.page.locator('div.count-down-wrap.v1_1')
    @property
    def final_agree_upgrade(self):
        return self.page.locator('img[src="//cdn.aibangbaoxian.net/netflow/magicCube/img/educate/upgradeSuccess/mf2023-upgrade-btn.png"]')
